<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
	<head>
		<title>Settings</title>
		<style type="text/css">
			body
			{
				width: 300px;
				height: 200px;
				margin-top:0;
				margin-left:0;
				margin-right: 0;
				margin-bottom: 0;
			}
			div.settingArea
			{
				width: 300px;
				height: 2000px;
				background-color: #ff0000;
				filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#666666', EndColorStr='#000000');
				border: none;
			}
			div.settingAreaOldStuff
			{
				border: double 5px #ffffff;
			}
			#nickArea
			{
				font-family: 'trebuchet ms', verdana, arial, helvetica, sans-serif;
				font-size: 18px;
				font-weight: bold;
				color: #dc3f25;
				padding: 3px;
			}
		</style>
		<script type="text/javascript" language="javascript">
			function initSettings()
			{
				System.Gadget.onSettingsClosing = settingsClosing;
				nickTextbox.value = System.Gadget.Settings.readString("Username");
			}
			function settingsClosing(event)
			{
				if (event.closeAction == event.Action.commit)
				{
					var nickName = nickTextbox.value;
					
					if (nickName != System.Gadget.Settings.readString("Username"))
					{
						System.Gadget.Settings.writeString("Username", nickName);
						System.Gadget.Settings.writeString("UpdateInfo", "!");
					}
				}
				event.cancel = false;
			}
		</script>
	</head>
	<body onload="initSettings()">
		<div id="settingArea" class="settingArea">
			<div id="nickArea">Smeknamn: <input type="text" id="nickTextbox" /></div>
		</div>
	</body>
</html>